<?php /* SVN: $Id: index.ctp 47608 2011-03-22 06:48:24Z sakthivel_135at10 $ */ ?>
<?php
	if(Configure::read('site.enable_three_step_subscription') && !empty($deals) &&  (isset($_COOKIE['CakeCookie']['is_subscribed']) || $auth->sessionValid())):
		$count = 1;
		?>
		<div class="deal-view-inner-block clearfix">
		      <div class="main-shad">&nbsp;</div>
		      <div class="side1">
		 <?php
		foreach($deals as $deal):		    		           
			echo $this->element('../deals/view', array('deal' => $deal, 'count' => $count, 'get_current_city' => $get_current_city, 'cache' => array('time' => Configure::read('site.element_cache'))));	
			$count++;
		endforeach;
		?>
			</div>
			<?php
			echo $this->element('../deals/sidebar', array('deal' => $deal, 'count' => $count, 'get_current_city' => $get_current_city, 'cache' => array('time' => Configure::read('site.element_cache'))));
			?>
		</div>
		<?php
	elseif(!Configure::read('site.enable_three_step_subscription') && !empty($deals)):  // When three step sub is disabled
		$count = 1;
		?>
		<div class="deal-view-inner-block clearfix">
		      <div class="main-shad">&nbsp;</div>
		      <div class="side1">
		 <?php
		foreach($deals as $deal):
			echo $this->element('../deals/view', array('deal' => $deal, 'count' => $count, 'get_current_city' => $get_current_city, 'cache' => array('time' => Configure::read('site.element_cache'))));
			$count++;
		endforeach;
		?>
			</div>
			<?php
			echo $this->element('../deals/sidebar', array('deal' => $deal, 'count' => $count, 'get_current_city' => $get_current_city, 'cache' => array('time' => Configure::read('site.element_cache'))));
			?>
		</div>
		<?php
	else:
		echo $this->element('subscriptions-add', array('cache' => array('time' => Configure::read('site.element_cache'))));
	endif;
?>
